package com.mango.game.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单主表
 * </p>
 *
 * @author Mango
 * @since 2025-02-24
 */
@TableName("order_info")
public class OrderInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单唯一标识
     */
    @TableId("uid")
    private Long uid;

    /**
     * 记录创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;

    /**
     * 记录更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    /**
     * 所属命名空间ID
     */
    @TableField("name_space")
    private Long nameSpace;

    /**
     * 所属游戏ID
     */
    @TableField("game_id")
    private Long gameId;

    /**
     * 所属渠道ID
     */
    @TableField("channel_id")
    private Long channelId;

    /**
     * 所属产品ID
     */
    @TableField("products_id")
    private Long productsId;

    /**
     * 游戏提供商那边的订单ID
     */
    @TableField("game_order")
    private String gameOrder;

    /**
     * 支付类型，默认只能是渠道（0-渠道 1-支付宝 2-微信）
     */
    @TableField("pay_type")
    private Integer payType;

    /**
     * 支付平台那边的订单ID
     */
    @TableField("pay_order")
    private String payOrder;

    /**
     * 订单金额，单位人民币元
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 支付标题（商品名称）
     */
    @TableField("title")
    private String title;

    /**
     * 透传数据，由SDK提交
     */
    @TableField("sdk_data")
    private String sdkData;

    /**
     * 是否测试单 0-是 1-否
     */
    @TableField("test_order")
    private Byte testOrder;

    /**
     * 状态 0-刚创建 1-支付完成 2-完成派单 3-无法派单
     */
    @TableField("status")
    private Byte status;

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Long getNameSpace() {
        return nameSpace;
    }

    public void setNameSpace(Long nameSpace) {
        this.nameSpace = nameSpace;
    }

    public Long getGameId() {
        return gameId;
    }

    public void setGameId(Long gameId) {
        this.gameId = gameId;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Long getProductsId() {
        return productsId;
    }

    public void setProductsId(Long productsId) {
        this.productsId = productsId;
    }

    public String getGameOrder() {
        return gameOrder;
    }

    public void setGameOrder(String gameOrder) {
        this.gameOrder = gameOrder;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getPayOrder() {
        return payOrder;
    }

    public void setPayOrder(String payOrder) {
        this.payOrder = payOrder;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSdkData() {
        return sdkData;
    }

    public void setSdkData(String sdkData) {
        this.sdkData = sdkData;
    }

    public Byte getTestOrder() {
        return testOrder;
    }

    public void setTestOrder(Byte testOrder) {
        this.testOrder = testOrder;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "OrderInfo{" +
        "uid = " + uid +
        ", createdAt = " + createdAt +
        ", updatedAt = " + updatedAt +
        ", nameSpace = " + nameSpace +
        ", gameId = " + gameId +
        ", channelId = " + channelId +
        ", productsId = " + productsId +
        ", gameOrder = " + gameOrder +
        ", payType = " + payType +
        ", payOrder = " + payOrder +
        ", amount = " + amount +
        ", title = " + title +
        ", sdkData = " + sdkData +
        ", testOrder = " + testOrder +
        ", status = " + status +
        "}";
    }
}
